☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

groups

Table of contents

Description:

This key defines the order and custom grouping for inputs within a Structure.

The value is an array of group objects. Each group object can contain a heading, comment, collapsed, and inputs array.

Appears in:
└── [*]
    └── groups
Type:
Array<groups[*]>
Items:
[*]Object#

This key represents an individual group object in the values[*].groups array.

The value is an object that groups inputs together within a structure value without changing the data structure. Each group typically contains a heading and inputs array.

Show examplesHide examples

In this example, we have configured a group with a heading and inputs array to organize structure inputs.

Copied to clipboard
_structures:
  article_information:
    values:
      - label: Blog
        value:
          title: 
          subtitle: 
          author: 
        groups:
          - heading: Titles
            inputs:
              - title
              - subtitle
          - heading: Details
            inputs:
              - author
{
  "_structures": {
    "article_information": {
      "values": [
        {
          "label": "Blog",
          "value": {
            "title": null,
            "subtitle": null,
            "author": null
          },
          "groups": [
            {
              "heading": "Titles",
              "inputs": [
                "title",
                "subtitle"
              ]
            },
            {
              "heading": "Details",
              "inputs": [
                "author"
              ]
            }
          ]
        }
      ]
    }
  }
}
Examples:

In this example, we want to separate the inputs into two groups with descriptive headings: title and subtitle under the Titles heading, and author under the Details heading.

Copied to clipboard
_structures:
  article_information:
    values:
      - label: Blog
        value:
          title: 
          subtitle: 
          author: 
        groups:
          - heading: Titles
            inputs:
              - title
              - subtitle
          - heading: Details
            inputs:
              - author
{
  "_structures": {
    "article_information": {
      "values": [
        {
          "label": "Blog",
          "value": {
            "title": null,
            "subtitle": null,
            "author": null
          },
          "groups": [
            {
              "heading": "Titles",
              "inputs": [
                "title",
                "subtitle"
              ]
            },
            {
              "heading": "Details",
              "inputs": [
                "author"
              ]
            }
          ]
        }
      ]
    }
  }
}
Open in a new tab